import Vue from 'vue'
import Vuex from 'vuex'
import Router from 'vue-router'
import Index from '@/views/system/Index'
import Login from '@/views/login/Login'

import HomePage from '@/views/HomePage'
import SystemManagerHomePage from '@/views/subSystem/systemManager/SystemManagerHomePage'
/**
 * 部门管理
 */
import DeptList from '@/views/subSystem/systemManager/DeptList'
/**
 * 用户管理
 */
import UserList from '@/views/subSystem/systemManager/UserList'
/**
 * 角色管理
 */
import RoleList from '@/views/subSystem/systemManager/RoleList'
/**
 * 登录日志
 */
import LoginLogList from '@/views/subSystem/systemManager/LoginLogList'
/**
 * 操作日志
 */
import OperationLogList from '@/views/subSystem/systemManager/OperationLogList'

Vue.use(Router)
Vue.use(Vuex)

export default new Router({
  routes: [
    {
      path: '/',
      redirect() {
        return '/login'
      }
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/index',
      name: 'Index',
      component: Index
    },
    {
      path: '/homePage',
      name: 'HomePage',
      component: HomePage
    },
    {
      path: '/systemManagerHomePage',
      name: 'SystemManagerHomePage',
      component: SystemManagerHomePage,
      children: [{
        path: 'deptList',
        name: 'DeptList',
        component: DeptList
      }, {
        path: 'userList',
        name: 'UserList',
        component: UserList
      }, {
        path: 'roleList',
        name: 'RoleList',
        component: RoleList
      }, {
        path: 'loginLogList',
        name: 'LoginLogList',
        component: LoginLogList
      }, {
        path: 'operationLogList',
        name: 'OperationLogList',
        component: OperationLogList
      }]
    }
    ]
})
